import App from './App'
import api from './public/api.js'
import uView from '@/uni_modules/uview-ui'

// #ifdef MP-WEIXIN
/*获取右上角胶囊信息->微信小程序、支付宝小程序、百度小程序、抖音小程序、QQ小程序  */ 
let ClientRect = uni.getMenuButtonBoundingClientRect();
Vue.prototype.statustop = Number(ClientRect.top);
Vue.prototype.statusheight = Number(ClientRect.height);
uni.setStorageSync('ClientRect', ClientRect);
// #endif

// #ifdef H5
let ClientRect = {bottom: 56,height: 32,left: 320,right: 407,top:0,width: 87}
uni.setStorageSync('ClientRect', ClientRect);
// #endif

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

uni.$u.config.unit = 'rpx'
Vue.prototype.apifun = api;
Vue.prototype.URLimg = api.URLimg;

import pageHead from './components/page-head.vue'
Vue.component('page-head', pageHead)
Vue.use(uView)

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif